package com.moter.demo01.juc.functioninterface;

import java.util.function.Function;

public class FunctionDemo {
    public static void main(String[] args) {
//        Function<String, Boolean> stringStringFunction =new Function<String, Boolean>() {
//            @Override
//            public Boolean apply(String str) {
//                return str.isEmpty();
//            }
//        };

//        Function<String, Boolean> stringStringFunction = (str)->{return str.isEmpty();};
        Function<String, Boolean> stringStringFunction = str->str.isEmpty();
        System.out.println(stringStringFunction.apply("123"));
    }
}
